package com.h117121.fashionshop.core.dom;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

@SuppressWarnings("serial")
@MappedSuperclass
@org.hibernate.annotations.Entity(dynamicUpdate = true)
public class BaseDom implements Serializable {
	public static final String COLUMN_ID = "Id";
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE)
	@Column(name = COLUMN_ID, nullable = false, updatable = false)
	protected long id;

	public static final String COLUMN_VERSION = "Version";
	@Version
	@Column(name = COLUMN_VERSION, nullable = false)
	protected int version;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

}